home *** CD-ROM | disk | FTP | other *** search
/ .net 2002 March / DotNetMagazine-Issue107-Coverdisc-NET107-02-03-PCMac.bin / pc / PC Software / free_browsing / DavesQckSearchDbar3-14 / dqsd.exe / searches / cddb.xml < prev    next >
Text File  |  2002-08-30  |  2KB  |  65 lines

  1. <search function="cddb">
  2.   <name>Gracenote CDDB</name>
  3.   <description>
  4.     Search CDDB by artist, album, song, or a combination of the three. Searches by artist by default.<br/>
  5.     <div class="helpboxDescLabels">Switches:</div>
  6.       <table class="helpboxDescTable">
  7.           <tr><td>/artist</td><td> - </td><td>Search for artists.</td></tr>
  8.           <tr><td>/album</td><td> - </td><td>Search for albums.</td></tr>
  9.           <tr><td>/song</td><td> - </td><td>Search for songs.</td></tr>
  10.       </table>
  11.     <div class="helpboxDescLabels">Examples:</div>
  12.     <table class="helpboxDescTable">
  13.           <tr><td>cddb Blender</td></tr>
  14.           <tr><td>cddb Let It Be /artist /title</td></tr>
  15.       </table>
  16.   </description>
  17.   <category>Entertainment</category>
  18.   <link>http://www.cddb.com/</link>
  19.   <contributor>Peter Risser, Ryan Edwards</contributor>
  20.   
  21.   <form name="cddbf"
  22.         action="http://www.cddb.com/php/search2.php3">
  23.     <input type="hidden" name="f"/>
  24.     <input type="hidden" name="q"/>
  25.   </form>
  26.   
  27.   <script><![CDATA[
  28.     function cddb(q)
  29.     {
  30.       var parsedargs = parseArgs(q, "artist, album, song");
  31.       if( nullArgs("cddb", q) )
  32.         return false;
  33.       else if( parsedargs.switches.length > 0 )
  34.       {
  35.         var args = "";
  36.         for( var i = 0; i < parsedargs.switches.length; i++ )
  37.         {
  38.           switch( parsedargs.switches[i].name )
  39.           {
  40.             case "artist": args += "artist"; break;
  41.             case "album": args += "disc"; break;
  42.             case "song": args += "track"; break;
  43.           }
  44.           args += (args ? " " : "");
  45.         }
  46.         document.cddbf.q.value = parsedargs.q;
  47.         document.cddbf.f.value = args;
  48.         submitForm(cddbf);
  49.       }
  50.       else
  51.       {
  52.         document.cddbf.q.value = parsedargs.q;
  53.         document.cddbf.f.value = "artist";
  54.         submitForm(cddbf);
  55.       }
  56.     }
  57.   ]]></script>
  58.  
  59.   <copyright>
  60.     Copyright (c) 2002 David Bau
  61.     Distributed under the terms of the
  62.     GNU Public License, Version 2 (http://www.gnu.org/copyleft/gpl.txt)
  63.   </copyright>
  64. </search>
  65.